import axios from "@/tool/axios"
// 角色信息
export const rolesM = () => axios.get("roles")
//添加角色
export const rolesAdd = (obj) => axios.post("roles",obj)
//删除角色
export const del = (id) => axios.delete(`roles/${id}`)
// 根据 ID 查询角色
// export const rightbyid = (id) => axios.get(`roles/${id}`)
// 编辑提交角色
export const editid = (id,obj) => axios.put(`roles/${id}`,obj)
//角色授权
export const shuo = (roleId, obj) => axios.post(`roles/${roleId}/rights`, obj)
//删除角色指定权限
export const delrolesrights = (roleId, rightId) => axios.delete(`roles/${roleId}/rights/${rightId}`)
